﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace WP8_Client
{
    public static class Globals
    {
        public static class General
        {
            public static String SessionStorageKey = "SESSIONS";
        }
        public static class Network
        {
            public static Boolean DebugMode = true;
            public static String ServerIp = "46.163.109.112";
            //public static String ServerIp = "192.168.178.25";
            public static Int32 Port = 1337;
        }

        public static class Separator
        {
            public static String Message = "|#|";
            public static String Content = "|-|";
        }

        public static class LocationController
        {
            public static TimeSpan UpdateInterval = TimeSpan.FromSeconds(30);
            public static uint DesiredAccuracyInMeters = 50;
        }

        public static class Security
        {
            public static String PublicKey = "B393E109CG47F";
        }

        public static String[] SplitMessageContent(String pContent)
        {
            return pContent.Split(new string[] { Separator.Content }, StringSplitOptions.None);
        }
        public static String[] SplitMessage(String pMessage)
        {
            return pMessage.Split(new string[] { Separator.Message }, StringSplitOptions.None);
        }
    }
}
